﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UtopianGame.graphics.menu;
using Microsoft.Xna.Framework.Content;

namespace UtopianGame.graphics.menu
{
    class CancelButton : TextMenuButton
    {
        public CancelButton(ContentManager cm)
        {
            init(cm);
            message = "Cancel";
            boundingBox.Width = ((int)GlobalDataHolder.baseFont.MeasureString(message).X) + 16;
            boundingBox.Height = ((int)GlobalDataHolder.baseFont.MeasureString(message).Y) + 16;
        }

        protected override void init(ContentManager cm)
        {
            base.init(cm);
        }
        protected override void executeFunction()
        {
            GlobalDataHolder.removeGraphicalObject(this.getParentObject());
            GlobalDataHolder.addGraphicalObject(new MenuScreen(contentManager, message), 32, 32);

        }
    }
}
